 



import UIKit

class NordicActionTableViewCell: UITableViewCell {
    
    enum Style {
        case `default`, destructive
    }
    
    var style: Style = .default {
        didSet {
            switch style {
            case .default:
                textLabel?.textColor = .nordicLake
            case .destructive:
                textLabel?.textColor = .nordicRed
            }
        }
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        setupAppearance()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        setupAppearance()
    }

    private func setupAppearance() {
        let defaultSize = textLabel?.font.pointSize ?? 12
        textLabel?.font = UIFont.gtEestiDisplay(.regular, size: defaultSize)
        
        switch style {
        case .default:
            textLabel?.textColor = .nordicLake
        case .destructive:
            textLabel?.textColor = .nordicRed
        }
    }
}
